import type { AppRouteModule } from '/@/router/types';

import { LAYOUT } from '/@/router/constant';
import { t } from '/@/hooks/web/useI18n';

const IFrame = () => import('/@/views/sys/iframe/FrameBlank.vue');

const iframe: AppRouteModule = {
  path: '/frame',
  name: 'Frame',
  component: LAYOUT,
  redirect: '/frame/doc',
  meta: {
    orderNo: 1000,
    icon: 'pajamas:monitor',
    title: t('routes.monitor.monitor'),
  },
  children: [
    {
      path: 'http://192.168.0.77:5173/',
      name: 'BigScreen',
      component: IFrame,
      meta: {
        title: t('routes.monitor.bigScreen'),
      },
    },
    {
      path: 'twin',
      name: 'Twin',
      component: IFrame,
      meta: {
        frameSrc: 'http://localhost:6022/',
        title: t('routes.monitor.digitalTwin'),
      },
    }
  ],
};

export default iframe;
